home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_pas
/
mkscren2
/
screenxx.ovl
< prev
next >
Wrap
Text File
|
1987-12-08
|
4KB
|
150 lines
overlay procedure screenXX; {<<<}
const
total_fields = 10;
label
repaint;
var
lun : _textfile;
field_no : integer;
xf,yf : array [1..total_fields] of integer;
done : boolean;
Var1 : string[ 4];
Var2 : string[11];
Var3 : string[12];
Var4 : string[ 4];
FieldTag1 : string[11];
FieldTag2 : string[12];
FieldTag3 : string[ 5];
AAAA : string[ 5];
CCCC : string[ 5];
Name : string[33];
begin
cursor_on;
gotoxy(1,5);Clreos;
with header do begin {vvv}
if exist(work_drive+'@'+a.operation_no+'TXT.xxx') then begin
assign(lun,work_drive+'@'+a.operation_no+'TXT.xxx');
reset(lun);
readln(lun,Var1);readln(lun,Var2);readln(lun,Var3);
readln(lun,Var4);readln(lun,FieldTag1);readln(lun,FieldTag2);
readln(lun,FieldTag3);readln(lun,AAAA);readln(lun,CCCC);
readln(lun,Name);close(lun);
end else begin
Var1 := '';
Var2 := '';
Var3 := '';
Var4 := '';
FieldTag1 := '';
FieldTag2 := '';
FieldTag3 := '';
AAAA := '';
CCCC := '';
Name := '';
end;
field_no := 1;
repaint:
gotoxy( 1, 4);write('Section Header 1');
draw_field( 7, 5,xf[ 1],yf[ 1],'Label1:',Var1,0, 4);
draw_field(26, 5,xf[ 2],yf[ 2],'Label2:',Var2,0,11);
draw_field(53, 5,xf[ 3],yf[ 3],'Label3:',Var3,0,12);
gotoxy( 1, 7);write('Section Header 1');
draw_field( 7, 8,xf[ 4],yf[ 4],'Label1:',Var4,0, 4);
draw_field(26, 8,xf[ 5],yf[ 5],'Label2:',FieldTag1,0,11);
draw_field(53, 8,xf[ 6],yf[ 6],'Label3:',FieldTag2,0,12);
gotoxy( 1,11);write('Section Header 2');
draw_field(22,13,xf[ 7],yf[ 7],'Aaaa:',FieldTag3,0, 5);
draw_field(34,13,xf[ 8],yf[ 8],'Bbbb:',AAAA,0, 5);
draw_field(46,13,xf[ 9],yf[ 9],'Cccc:',CCCC,0, 5);
draw_field( 1,15,xf[10],yf[10],'xxxx:',Name,0,33);
repeat
Case field_no of
1 : begin
done := false;
repeat
get_field(Var1, 4,xf[ 1],yf[ 1],term,answer,0);
done := integer_check(Var1,'N','N','0', 4);
until done;
end;
2 : begin
done := false;
repeat
get_field(Var2,11,xf[ 2],yf[ 2],term,answer,0);
done := list_check(Var2,'YES,NO,MAYBE','N','Y','N',' ',11);
until done;
end;
3 : begin
done := false;
repeat
get_field(Var3,12,xf[ 3],yf[ 3],term,answer,0);
done := real_check(Var3,'N','N','0',12);
until done;
end;
4 : begin
done := false;
repeat
get_field(Var4, 4,xf[ 4],yf[ 4],term,answer,0);
done := string_check(Var4,'Y','N',' ', 4);
until done;
end;
5 : begin
done := false;
repeat
get_field(FieldTag1,11,xf[ 5],yf[ 5],term,answer,0);
done := integer_check(FieldTag1,'N','N','0',11);
until done;
end;
6 : begin
done := false;
repeat
get_field(FieldTag2,12,xf[ 6],yf[ 6],term,answer,0);
done := real_check(FieldTag2,'N','N','0',12);
until done;
end;
7 : begin
done := false;
repeat
get_field(FieldTag3, 5,xf[ 7],yf[ 7],term,answer,0);
done := string_check(FieldTag3,'Y','N',' ', 5);
until done;
end;
8 : begin
done := false;
repeat
get_field(AAAA, 5,xf[ 8],yf[ 8],term,answer,0);
done := string_check(AAAA,'Y','N',' ', 5);
until done;
end;
9 : begin
done := false;
repeat
get_field(CCCC, 5,xf[ 9],yf[ 9],term,answer,0);
done := string_check(CCCC,'Y','N',' ', 5);
until done;
end;
10 : begin
done := false;
repeat
get_field(Name,33,xf[10],yf[10],term,answer,0);
done := string_check(Name,'Y','N',' ',33);
until done;
end;
end;
case answer of
^I,^M,^X : if (field_no = total_fields) then field_no := 1 else field_no := field_no + 1;
^E : if field_no = 1 then field_no := total_fields else field_no := field_no - 1;
^T : field_no := 1;
^B : field_no := total_fields;
end;
until (answer = ^M) and (field_no=1) or (answer = #27);
if (answer <> #27) then begin {vvv}
assign(lun,work_drive+'@'+a.operation_no+'TXT.xxx');
rewrite(lun);
writeln(lun,Var1);writeln(lun,Var2);writeln(lun,Var3);
writeln(lun,Var4);writeln(lun,FieldTag1);writeln(lun,FieldTag2);
writeln(lun,FieldTag3);writeln(lun,AAAA);writeln(lun,CCCC);
writeln(lun,Name);close(lun);
end;
end;
cursor_off;
end;